﻿{extend name="public:base" /}

{block name="css"}
    <link href="/static/laydate/theme/default/laydate.css">
{/block}

{block name="content"}

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="post">
                        <div class="box-item layui-form-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label layui-form-label">拼团商品</label>
                                <div class="col-sm-3">
                                    {if input('id')}
                                    <input type="text" class="form-control" value="{$info.goods_name}" readonly>
                                    {else /}
                                    <select name="goods_id" class="form-control form-control-lg">
                                        <option value="0">请选择商品</option>
                                        {volist name="goods_list" id="vo"}
                                        <option value="{$vo.id}">{$vo.name}</option>
                                        {/volist}
                                    </select>
                                    {/if}
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        <div class="box-item layui-form-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label layui-form-label">拼团时间</label>
                                <div class="col-sm-3">
                                    <input placeholder="请选择开始日期" type="text" name="start_time" class="form-control form-control-lg start_time" value="{:timeFormat($info.start_time, 'Y-m-d')}" readonly>
                                </div>
                                <div class="col-sm-3">
                                    <input placeholder="请选择结束日期" type="text" name="end_time" class="form-control form-control-lg end_time" value="{:timeFormat($info.end_time, 'Y-m-d')}" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        <div class="box-item layui-form-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label layui-form-label">拼团人数</label>
                                <div class="col-sm-3">
                                    <input type="text" name="people_number" class="form-control" value="{$info.people_number}" placeholder="请输入拼团人数">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        <div class="box-item layui-form-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label layui-form-label">拼团时限（分）</label>
                                <div class="col-sm-3">
                                    <input type="text" name="time_limit" class="form-control" value="{$info.time_limit}" placeholder="请输入拼团时限">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        <div class="box-item layui-form-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label layui-form-label">成团价格</label>
                                <div class="col-sm-3">
                                    <input type="text" name="group_price" class="form-control" value="{$info.group_price}" placeholder="请输入成团价格">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        <div class="box-item layui-form-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label layui-form-label">团长价格</label>
                                <div class="col-sm-3">
                                    <input type="text" name="chief_price" class="form-control" value="{$info.chief_price}" placeholder="请输入团长价格">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        <div class="box-item layui-form-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label layui-form-label">限制成团数</label>
                                <div class="col-sm-3">
                                    <input type="text" name="group_limit_number" class="form-control" value="{$info.group_limit_number}" placeholder="请输入限制成团数">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="form-group row">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button type="button" class="btn btn-w-m btn-default back-page">返回</button>
                                <button type="button" class="btn btn-w-m btn-primary ajax-post">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{/block}

{block name="js"}
<script src="/static/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: '.start_time', //指定元素
        type: 'datetime'
    });
    laydate.render({
        elem: '.end_time' //指定元素
    });
</script>
{/block}